// export function eventTrack(eventCode: string, kvFun: () => object) {
//   return function fun(target: any, key: string, descriptor: any): any {
//     const method = descriptor.value;
//     descriptor.value = function(): any {
//       const kv = kvFun.apply(this);
//       TDAPP.onEvent(eventCode, '', Object.assign({}, kv, {
//         usercode: localStorage.getItem('userCode'),
//       }));
//       TDAPP.send();
//       console.info('埋点', eventCode, kv);
//       return method.apply(this, arguments);
//     };

//     return descriptor;
//   };
// }

// export function eventTrack(eventCode: string, kvFun: () => object, fn: () => any): any {
//   const kv = kvFun.apply(this);
//   TDAPP.onEvent(eventCode, '')
// }

export function eventTrack(eventCode) {
  TDAPP.onEvent(eventCode, '');
  TDAPP.send();
}
